/**
* Copyright (c) By zengqh.
*
* This program is just for fun or demo, in the hope that it  
* will be useful, you can redistribute it and/or modify freely.
*
* Time: 2012/07/25
* File: OGLFrameBuffer.h
* Blog: http://www.cnblogs.com/zengqh/
**/

#ifndef OGLFrameBuffer_h__
#define OGLFrameBuffer_h__

#include "../FrameBuffer.h"
#include "../RenderView.h"

class OGLFrameBuffer : public FrameBuffer
{
public:
	OGLFrameBuffer();
	~OGLFrameBuffer();

	void Attach(u32 att, RenderView* rv);
	void Detach(u32 att);

	GLuint getFBO() const;

protected:
	void setup();
protected:
	typedef						std::vector<RenderView*> ClrRenderTargetList;
	ClrRenderTargetList			_clr_target;
	RenderView*					_rs_target;
	GLuint						_fbo;
};
#endif    /* OGLFrameBuffer_h__ */